{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "f9bc4b60-ea39-4065-82b1-da869c294963",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "The sum is: 12\n"
     ]
    }
   ],
   "source": [
    "a = 5\n",
    "b = 7\n",
    "result = a + b\n",
    "print(\"The sum is:\", result)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "8f387d9c-2035-402d-a656-3311c59fa0ce",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "333\n",
      "444\n"
     ]
    }
   ],
   "source": [
    "j = 111\n",
    "k = j * 3\n",
    "print (k)\n",
    "print (j + k)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "ceb25dff-35b0-4bae-9886-c9036792a026",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "333\n",
      "444\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "666"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "j = 111\n",
    "k = j * 3\n",
    "print (k)\n",
    "print (j + k)\n",
    "j * 6"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "e07502e9-8de4-46cd-96f1-9d46a33ced0e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n",
      "taoyanxiaogou\n"
     ]
    },
    {
     "ename": "KeyboardInterrupt",
     "evalue": "",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mKeyboardInterrupt\u001b[0m                         Traceback (most recent call last)",
      "\u001b[1;32m~\\AppData\\Local\\Temp/ipykernel_44264/3433630490.py\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      3\u001b[0m \u001b[1;32mwhile\u001b[0m \u001b[1;32mTrue\u001b[0m\u001b[1;33m:\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      4\u001b[0m     \u001b[0mprint\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;34m'taoyanxiaogou'\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 5\u001b[1;33m     \u001b[0mtime\u001b[0m\u001b[1;33m.\u001b[0m\u001b[0msleep\u001b[0m\u001b[1;33m(\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m)\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mKeyboardInterrupt\u001b[0m: "
     ]
    }
   ],
   "source": [
    "import time\n",
    "\n",
    "while True:\n",
    "    print('taoyanxiaogou')\n",
    "    time.sleep(3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "c5390d8d-6c66-41c5-917d-63da47f7543f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ii_强行打断\n"
     ]
    }
   ],
   "source": [
    "print('ii_强行打断')"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "8f2c1e00-b05f-4b2f-aa6f-b67871fb7263",
   "metadata": {},
   "source": [
    "# %% [markdown]\n",
    "\"\"\"\n",
    "# Jupyter Notebook Markdown 示例\n",
    "\n",
    "## 1. 基础文本格式\n",
    "\n",
    "**粗体文本**  \n",
    "*斜体文本*  \n",
    "~~删除线~~  \n",
    "`行内代码`\n",
    "\n",
    "## 2. 标题层级\n",
    "\n",
    "# H1\n",
    "## H2\n",
    "### H3\n",
    "#### H4\n",
    "\n",
    "## 3. 列表\n",
    "\n",
    "### 无序列表\n",
    "- 项目1\n",
    "- 项目2\n",
    "  - 子项目2.1\n",
    "  - 子项目2.2\n",
    "\n",
    "### 有序列表\n",
    "1. 第一项\n",
    "2. 第二项\n",
    "   1. 嵌套项\n",
    "\n",
    "## 4. 链接与图片\n",
    "\n",
    "[百度链接](https://www.baidu.com)\n",
    "\n",
    "![Python Logo](https://www.python.org/static/img/python-logo.png)\n",
    "\n",
    "## 5. 表格\n",
    "\n",
    "| 姓名 | 年龄 | 职业 |\n",
    "|------|------|------|\n",
    "| 张三 | 25   | 工程师 |\n",
    "| 李四 | 30   | 数据分析师 |\n",
    "\n",
    "## 6. 数学公式\n",
    "\n",
    "### 行内公式\n",
    "欧拉公式：$e^{i\\pi} + 1 = 0$\n",
    "\n",
    "### 块公式\n",
    "$$\n",
    "\\int_{-\\infty}^{\\infty} e^{-x^2} dx = \\sqrt{\\pi}\n",
    "$$\n",
    "\n",
    "## 7. 代码块\n",
    "\n",
    "### Python 示例\n",
    "```python\n",
    "def hello_world():\n",
    "    print(\"Hello, World!\")\n",
    "    \n",
    "hello_world()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7691260c-c6b2-460a-b09b-61ded1d95ce1",
   "metadata": {},
   "source": [
    "<!DOCTYPE html>\n",
    "<html lang=\"zh-CN\">\n",
    "\n",
    "<head>\n",
    "    <meta charset=\"UTF-8\">\n",
    "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n",
    "    <title>简单响应式网页</title>\n",
    "    <script src=\"https://cdn.tailwindcss.com\"></script>\n",
    "    <link href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css\" rel=\"stylesheet\">\n",
    "</head>\n",
    "\n",
    "<body class=\"bg-gray-100 font-sans\">\n",
    "    <!-- 导航栏 -->\n",
    "    <nav class=\"bg-blue-600 p-4\">\n",
    "        <div class=\"container mx-auto flex justify-between items-center\">\n",
    "            <a href=\"#\" class=\"text-white text-xl font-bold\">我的网站</a>\n",
    "            <div class=\"md:hidden\">\n",
    "                <button id=\"menu-toggle\" class=\"text-white focus:outline-none\">\n",
    "                    <i class=\"fas fa-bars\"></i>\n",
    "                </button>\n",
    "            </div>\n",
    "            <ul class=\"hidden md:flex space-x-4\">\n",
    "                <li><a href=\"#\" class=\"text-white hover:text-gray-200\">首页</a></li>\n",
    "                <li><a href=\"#\" class=\"text-white hover:text-gray-200\">关于我们</a></li>\n",
    "                <li><a href=\"#\" class=\"text-white hover:text-gray-200\">服务</a></li>\n",
    "                <li><a href=\"#\" class=\"text-white hover:text-gray-200\">联系我们</a></li>\n",
    "            </ul>\n",
    "        </div>\n",
    "        <ul id=\"menu\" class=\"hidden md:hidden bg-blue-600 p-4 space-y-2\">\n",
    "            <li><a href=\"#\" class=\"text-white hover:text-gray-200\">首页</a></li>\n",
    "            <li><a href=\"#\" class=\"text-white hover:text-gray-200\">关于我们</a></li>\n",
    "            <li><a href=\"#\" class=\"text-white hover:text-gray-200\">服务</a></li>\n",
    "            <li><a href=\"#\" class=\"text-white hover:text-gray-200\">联系我们</a></li>\n",
    "        </ul>\n",
    "    </nav>\n",
    "\n",
    "    <!-- 内容区域 -->\n",
    "    <div class=\"container mx-auto p-4\">\n",
    "        <h1 class=\"text-3xl font-bold text-gray-800 mb-4\">欢迎来到我的网站</h1>\n",
    "        <p class=\"text-gray-700 mb-8\">这是一个简单的响应式网页示例，展示了如何使用 Tailwind CSS 构建现代、美观的网页。</p>\n",
    "        <div class=\"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4\">\n",
    "            <div class=\"bg-white p-4 rounded shadow\">\n",
    "                <img src=\"https://picsum.photos/200/300\" alt=\"示例图片\" class=\"w-full h-auto mb-4\">\n",
    "                <h2 class=\"text-xl font-bold text-gray-800 mb-2\">项目 1</h2>\n",
    "                <p class=\"text-gray-700\">这是一个示例项目的描述。</p>\n",
    "            </div>\n",
    "            <div class=\"bg-white p-4 rounded shadow\">\n",
    "                <img src=\"https://picsum.photos/200/300\" alt=\"示例图片\" class=\"w-full h-auto mb-4\">\n",
    "                <h2 class=\"text-xl font-bold text-gray-800 mb-2\">项目 2</h2>\n",
    "                <p class=\"text-gray-700\">这是另一个示例项目的描述。</p>\n",
    "            </div>\n",
    "            <div class=\"bg-white p-4 rounded shadow\">\n",
    "                <img src=\"https://picsum.photos/200/300\" alt=\"示例图片\" class=\"w-full h-auto mb-4\">\n",
    "                <h2 class=\"text-xl font-bold text-gray-800 mb-2\">项目 3</h2>\n",
    "                <p class=\"text-gray-700\">这是第三个示例项目的描述。</p>\n",
    "            </div>\n",
    "        </div>\n",
    "    </div>\n",
    "\n",
    "    <!-- 页脚 -->\n",
    "    <footer class=\"bg-gray-800 p-4 text-white text-center\">\n",
    "        <p>&copy; 2025 我的网站。保留所有权利。</p>\n",
    "    </footer>\n",
    "\n",
    "    <script>\n",
    "        const menuToggle = document.getElementById('menu-toggle');\n",
    "        const menu = document.getElementById('menu');\n",
    "\n",
    "        menuToggle.addEventListener('click', () => {\n",
    "            menu.classList.toggle('hidden');\n",
    "        });\n",
    "    </script>\n",
    "</body>\n",
    "\n",
    "</html>\n",
    "    "
   ]
  },
  {
   "cell_type": "markdown",
   "id": "243c315f-e9c5-49b1-ae4c-cbb57adf063b",
   "metadata": {},
   "source": [
    "\n",
    "<h1>欢迎来到我的简单网页</h1>\n",
    "\n",
    "<!-- 段落内容 -->\n",
    "<p>这是一个不包含 CSS 样式的基础 HTML 示例，用来展示网页的基本结构和元素。</p>\n",
    "\n",
    "<!-- 无序列表 -->\n",
    "<h2>我喜欢的水果</h2>\n",
    "<ul>\n",
    "    <li>苹果</li>\n",
    "    <li>香蕉</li>\n",
    "    <li>草莓</li>\n",
    "</ul>\n",
    "\n",
    "<!-- 链接 -->\n",
    "<p>你可以访问 <p>你可以访问 <a href=\"https://www.example.com\">示例网站</a> 获取更多信息。</p>\n",
    "\n",
    "<!-- 图片 -->\n",
    "<img src=\"https://picsum.photos/200/300\" alt=\"示例图片\">"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "c25175ef-4838-446d-a6e6-be83cffbcf09",
   "metadata": {},
   "source": [
    "<!DOCTYPE html>\n",
    "<html>\n",
    "<head>\n",
    "    <title>复杂表格示例</title>\n",
    "    <style>\n",
    "        table, th, td {\n",
    "            border: 1px solid black;\n",
    "            border-collapse: collapse;\n",
    "            padding: 8px;\n",
    "            text-align: center;\n",
    "        }\n",
    "    </style>\n",
    "</head>\n",
    "<body>\n",
    "\n",
    "<h2>复杂表格实例</h2>\n",
    "\n",
    "<table>\n",
    "    <tr>\n",
    "        <th rowspan=\"2\">头部单元格1</th>\n",
    "        <th colspan=\"2\">头部单元格2</th>\n",
    "        <th rowspan=\"2\">头部单元格3</th>\n",
    "    </tr>\n",
    "    <tr>\n",
    "        <th>子头部单元格2.1</th>\n",
    "        <th>子头部单元格2.2</th>\n",
    "    </tr>\n",
    "    <tr>\n",
    "        <td>数据1</td>\n",
    "        <td>数据2</td>\n",
    "        <td>数据3</td>\n",
    "        <td>数据4</td>\n",
    "    </tr>\n",
    "    <tr>\n",
    "        <td>数据5</td>\n",
    "        <td colspan=\"2\">合并的数据6-7</td>\n",
    "        <td>数据8</td>\n",
    "    </tr>\n",
    "    <tr>\n",
    "        <td>数据9</td>\n",
    "        <td>数据10</td>\n",
    "        <td>数据11</td>\n",
    "        <td>数据12</td>\n",
    "    </tr>\n",
    "</table>\n",
    "\n",
    "</body>\n",
    "</html>"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "d98cab3b-4e8e-4376-8ac9-a450284674d1",
   "metadata": {},
   "source": [
    "\\documentclass{article}\n",
    "\\usepackage{amsmath} % 提供更多数学环境支持\n",
    "\\usepackage{amssymb} % 提供额外的数学符号\n",
    "\n",
    "\\begin{document}\n",
    "\n",
    "\\section*{示例数学公式}\n",
    "\n",
    "以下是几个典型的数学公式示例：\n",
    "\n",
    "\\subsection*{1. 一元二次方程求根公式}\n",
    "对于形如 $ ax^2 + bx + c = 0 $ 的一元二次方程，其解为：\n",
    "$$\n",
    "x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}\n",
    "$$\n",
    "\n",
    "\\subsection*{2. 泰勒展开式}\n",
    "函数 $ f(x) $ 在点 $ a $ 附近的泰勒展开式为：\n",
    "$$\n",
    "f(x) = \\sum_{n=0}^{\\infty} \\frac{f^{(n)}(a)}{n!}(x-a)^n\n",
    "$$\n",
    "\n",
    "\\subsection*{3. 概率密度函数（正态分布）}\n",
    "正态分布 $ N(\\mu, \\sigma^2) $ 的概率密度函数为：\n",
    "$$\n",
    "f(x) = \\frac{1}{\\sqrt{2\\pi}\\sigma} e^{-\\frac{(x-\\mu)^2}{2\\sigma^2}}\n",
    "$$\n",
    "\n",
    "\\subsection*{4. 矩阵运算}\n",
    "设有两个矩阵 $ A $ 和 $ B $，它们的乘积定义如下：\n",
    "$$\n",
    "A = \n",
    "\\begin{bmatrix}\n",
    "a_{11} & a_{12} \\\\\n",
    "a_{21} & a_{22}\n",
    "\\end{bmatrix}, \\quad\n",
    "B = \n",
    "\\begin{bmatrix}\n",
    "b_{11} & b_{12} \\\\\n",
    "b_{21} & b_{22}\n",
    "\\end{bmatrix}, \\quad\n",
    "AB = \n",
    "\\begin{bmatrix}\n",
    "a_{11}b_{11} + a_{12}b_{21} & a_{11}b_{12} + a_{12}b_{22} \\\\\n",
    "a_{21}b_{11} + a_{22}b_{21} & a_{21}b_{12} + a_{22}b_{22}\n",
    "\\end{bmatrix}\n",
    "$$\n",
    "\n",
    "\\subsection*{5. 多重积分}\n",
    "三维空间中的体积积分可以表示为：\n",
    "$$\n",
    "V = \\iiint_{D} f(x,y,z) \\, dx\\,dy\\,dz\n",
    "$$\n",
    "\n",
    "\\subsection*{6. 极限与导数}\n",
    "极限定义：\n",
    "$$\n",
    "\\lim_{x \\to a} f(x) = L\n",
    "$$\n",
    "导数定义：\n",
    "$$\n",
    "f'(x) = \\frac{d}{dx}f(x) = \\lim_{h \\to 0} \\frac{f(x+h) - f(x)}{h}\n",
    "$$\n",
    "\n",
    "\\end{document}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6f327667-8300-40c6-8778-8f4eba7f1e67",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.12.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
